* (bug 14424) Fix regression in $wgRateLimitsExcludedGroups support
authorBrion Vibber <brion@users.mediawiki.org>
Fri, 6 Jun 2008 15:53:49 +0000 (15:53 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Fri, 6 Jun 2008 15:53:49 +0000 (15:53 +0000)
Fixes logic error introduced in r35908.

includes/User.php

index a3a7144..5db907c 100644 (file)
@@ -1102,13 +1102,11 @@ class User {
         */
        public function isPingLimitable() {
                global $wgRateLimitsExcludedGroups;
-               if ( array_intersect($this->getEffectiveGroups(), $wgRateLimitsExcludedGroups) == array() || 
-                       !$this->isAllowed('noratelimit') ) {
-                               return true;
-                       }
-               else {
+               if( array_intersect( $this->getEffectiveGroups(), $wgRateLimitsExcludedGroups ) ) {
+                       // Deprecated, but kept for backwards-compatibility config
                        return false;
                }
+               return !$this->isAllowed('noratelimit');
        }
 
        /**